#ifndef CODEEXERCISE_H_
#define CODEEXERCISE_H_

#include <string>
#include <fstream>
#include <iostream>
#include <vector>
#include <map>
#include "statistic.h"
using namespace std;

class Exercise{
public:
    Exercise(){}
    Exercise(std::string input_filename, std::string output_filename, int total_columns);
    virtual ~Exercise();

    int next_line(std::string & s);
    vector<string> separate_string(const std::string & s , char separator);
    void run();
    void write_to_file();

    std::map<string,Statistic> statistic_map;
private:
    std::string input_filename;
    std::string output_filename;
    int column_num;
    std::ifstream input_stream;
    std::ofstream output_stream;
    char separator = ',';
};

#endif


